import { wxLogin } from "@/utils/auth";
import { request } from "@/utils/request";

// 获取个人信息
export const apiGetUserInfo = (data: any = {}) => {
  // let { code } = await wxLogin() as any;
  return request({
    url: "/user/info",
    method: "POST",
    // data: {...data, code},
    data
  });
}
// 修改
export const apiEdit = (data: any = {}) => {
  return request({
    url: "/user/edit",
    method: "POST",
    data,
  });

}
export const apiUserGrade = (data: any = {}) => {
  return request({
    url: "/user/edit",
    method: "POST",
    data,
  });
}
// 个性标签
export const apiUserLabel = (data: any = {}) => {
  return request({
    url: "/types/labelList",
    method: "POST",
    data,
  });
}
// 会员等级
export const apiGradeList = (data: any = {}) => {
  return request({
    url: "/member/list",
    method: "POST",
    data,
  });
}
// 会员信息
export const apiMySelf = (data: any = {}) => {
  return request({
    url: "/user/mySelf",
    method: "POST",
    data,
  });
}

// 消息查询-数量显示
export const noReadNum = (data: any = {}) => {
  return request({
    url: "/notice/noReadNum",
    method: "POST",
    data,
  });
}

// 评奖活动 http://localhost:8080/leshi/activities/list
export const activities = (data: any = {}) => {
  return request({
    url: "/activities/list",
    method: "POST",
    data,
  });
}

// 评奖活动详情 http://localhost:8080/leshi/activities/info
export const activitiesInfo = (data: any = {}) => {
  return request({
    url: "/activities/info",
    method: "POST",
    data,
  });
}

// 选择参赛作品 http://localhost:8080/leshi/commodity/activityList
export const activityList = (data: any = {}) => {
  return request({
    url: "/commodity/activityList",
    method: "POST",
    data,
  });
}

// 个人vip详情
export const getVipInfo = (data: any = {}) => {
  return request({
    url: "/user/getVip",
    method: "POST",
    data,
  });
}